/*
求斐波那契数列的第n项。(迭代实现)
 */

import java.util.Scanner;

public class Work4 {
    public static int fibo(int n){
        if(n<=2)
            return 1;
        int a = 1,b = 1,c = 1;
        while(n>2){
            c = a+b;
            a=b;
            b=c;
            n--;
        }
        return c;
    }

    public static void main4(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(fibo(n));
    }
}
